#include <stdio.h>
#include "charactor.h"

int main(void)
{
	char ch;

	while (1) {
		scanf("%c", &ch);	
		if ('\n' == ch)
			break;
		if (is_upper(ch)) {
			printf("%c", upper_to_lower(ch));
		} else if (is_lower(ch)) {
			printf("%c", lower_to_upper(ch));
		} else if (is_digital(ch)) {
			printf("%d", digitalchar_to_int(ch));
		} else {
			printf("%c", ch);
		}
	}

	return 0;
}

